<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        input {
            padding-left: 5px;
            outline: none;
        }
    </style>
</head>

<body>
    <input type="text" placeholder="邮箱/ID/手机" value="">
    <script>
        //获得事件源
        var ipt = document.querySelector('input')
        //注册事件
        ipt.onclick = function () {
            this.placeholder = ''
            this.style.border = '1px solid pink'
        }
        ipt.onblur = function () {
            this.placeholder = '邮箱/ID/手机'
            this.style.border = ''
        }
    </script>
</body>

</html>